while True:
    h_min = cv2.getTrackbarPos("Hue Min", "TrackBars")
    h_max = cv2.getTrackbarPos("Hue Max", "TrackBars")
    s_min = cv2.getTrackbarPos("Hue Min", "TrackBars")
    s_max = cv2.getTrackbarPos("Hue Max", "TrackBars")
    v_min = cv2.getTrackbarPos("Hue Min", "TrackBars")
    v_max = cv2.getTrackbarPos("Hue Max", "TrackBars")
    lower=np.array([[h_min],[s_min],[v_min]])
    upper=np.array([[h_min],[s_min],[v_min]])
    mask=cv2.inRange(imHSV,lower,upper)
    cv2.imshow("Mask",mask)
    imgResult=cv2.bitwise_and(img,img,mask=mask)
    cv2.imshow("Result",imgResult)
    if cv2.waitKey(1)==ord('q')
        break
cv2.destroyAllWindows()